import 'package:flutter/material.dart';
import 'package:flutter_wan_android/utils/navigator_utils.dart';

///欢迎页
class WelcomePage extends StatefulWidget {
  static final String sName = "/";

  @override
  State<StatefulWidget> createState() {
    return _WelcomePageState();
  }
}

class _WelcomePageState extends State<WelcomePage> {
  @override
  Widget build(BuildContext context) {
    return new Container(
        child: new Center(
            child: Image.asset(
      "images/welcome.png",
      width: double.infinity,
      height: double.infinity,
      fit: BoxFit.cover,
    )));
  }

  @override
  void initState() {
    super.initState();
    goHome();
  }

  Future<Null> goHome() async {
    await Future.delayed(Duration(milliseconds: 2500), () {
      NavigatorUtils.goHome(context);
    });
  }
}
